import request from '@/request'
const URL = process.env.VUE_APP_API
export function getSelectOptions(params) {
  return new Promise((resolve) => {
    resolve({
      data: [
        {
          label: '异步的值1',
          value: 1
        },
        {
          label: '异步的值2',
          value: 2
        }
      ]
    })
  })
}

// 组织列表树形结构
export function getOrgList(params) {
  return request({
    url: `${URL}/manage/upms/org/tree`,
    method: 'get',
    params
  })
}

// 组织列表
export function getUpmsOrgList(params) {
  return request({
    url: `${URL}/manage/upms/org/list`,
    method: 'get',
    params
  })
}

// 菜单列表
export function getMenuList(params) {
  return request({
    url: `${URL}/manage/upms/permission/getPermission`,
    method: 'get',
    params
  })
}

// 新的组织接口
export function getOrgTreeByOrgType(params) {
  return request({
    url: `${URL}/manage/upms/org/getOrgTreeByOrgType`,
    method: 'get',
    params
  })
}

// 字典表查询
export function getListByType(params) {
  return request({
    url: `${URL}/manage/upmsDicData/listByType`,
    method: 'get',
    params
  })
}
